package com.ny.demo2;

public class BankPay implements Pay {

    double m =10;

    @Override
    public void pay(double money) {
        if(m<money){
            System.out.println("你的余额不足，请选择其他支付方式");

        }
        else {
            System.out.println("你消费了"+money);
            m = m- money;
            System.out.println("你的余额为"+m);
        }
    }
}
